-
Notifications
You must be signed in to change notification settings - Fork 676
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Qdrant enhancement #1049
base: master
Are you sure you want to change the base?
feat: Qdrant enhancement #1049
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good but what do we must have QdrantManager
? Can you explain?
r""" | ||
Manages interaction with Qdrant, handling collection creation, deletion, | ||
and client management. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove linebreak for the first line
r""" | |
Manages interaction with Qdrant, handling collection creation, deletion, | |
and client management. | |
r"""Manages interaction with Qdrant, handling collection creation, deletion, | |
and client management. |
be initialized with an in-memory storage (`":memory:"`). | ||
""" | ||
|
||
def __init__( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
def __init__( | |
@dependencies_required('qdrant_client') | |
def __init__( |
r""" | ||
Updates the payload of the vectors in the collection. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
r""" | |
Updates the payload of the vectors in the collection. | |
r"""Updates the payload of the vectors in the collection. |
r""" | ||
Returns the status of the collection. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
r""" | |
Returns the status of the collection. | |
r"""Returns the status of the collection. |
payload_filter (Optional[Dict[str, Any]], optional): A filter for | ||
the payload to delete points matching specific conditions. If | ||
`ids` is provided, `payload_filter` will be ignored unless both | ||
are combined explicitly. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add some examples about how to use the payload_filter
in docstring.
manager = QdrantManager(path=tmpdir) | ||
|
||
if manager.collection_exists(collection_name): | ||
manager.delete_collection(collection_name) | ||
|
||
storage = QdrantStorage( | ||
vector_dim=4, | ||
path=tmpdir, | ||
collection_name=collection_name, | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What use cases we need to first define QdrantManager
and then QdrantStorage
?
_qdrant_local_client_map: Dict[str, Tuple[Any, int]] = {} | ||
|
||
|
||
class QdrantManager: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What use cases we must need to have QdrantManager
separately? What if we just put all things into QdrantStorage
?
Thanks @lightaime
The function of In the original design, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @koch3092 , from Qdrant's documentation, I suggest we use client to manage both collection and vector, I feel there's no need to add one more layer to make the design complex
cc @lightaime
Description
refactor qdrant module and add some features
Motivation and Context
close #989
Types of changes
What types of changes does your code introduce? Put an
x
in all the boxes that apply:Implemented Tasks
Checklist
Go over all the following points, and put an
x
in all the boxes that apply.If you are unsure about any of these, don't hesitate to ask. We are here to help!